import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // { path: '/',component: import('../views/page/login.html')},
    { path: '/',redirect: '/manager',},
    { path: '/manager', component: import('../views/Manager.vue'),redirect: '/manager/home',
      children: [
        {path: 'home', component: import('../views/Home.vue')},
        {path: 'about', component: import('../views/AboutView.vue')},
        {path: 'admin', component: import('../views/page/AdminInfo.vue')},
        {path: 'fileInfo', component: import('../views/page/FileInfo.vue')},
        {path: 'userInfo', component: import('../views/page/UserInfo.vue')},
        {path: 'typeInfo', component: import('../views/page/TypeInfo.vue')}
    ]
    },
    { path: '/notFound', component: import('../views/404.vue'),},
    { path: '/:pathMatch', redirect: '/notFound'},
  ],
})

export default router
